$(function() {
	var colors = ['#2266a4', '#7cd1f4', '#00b2d9', '#f3ff3b'];
	Highcharts.setOptions({
		colors: colors
	});
	showBar(1258811, 74357, 29721, 8923);
	showLine();
	//	showChartPie(1258811,74357,29721,8923);
	showChartPie(4, 3, 3, 2);
	showUserChart();
	showChartRegister();
});

function initColumn() {
	// 基于准备好的dom，初始化echarts实例
	var myChart = echarts.init(document.getElementById('main'));

	// 指定图表的配置项和数据
	var option = {
		title: {
			text: '',
			subtext: ''
		},
		tooltip: {
			trigger: 'axis'
		},
		toolbox: {
			show: true,
			feature: {
				mark: {
					show: true
				},
				dataView: {
					show: true,
					readOnly: false
				},
				magicType: {
					show: true,
					type: ['line', 'bar']
				},
				restore: {
					show: true
				},
				saveAsImage: {
					show: true
				}
			}
		},
		calculable: true,
		xAxis: [{
			type: 'value',
			boundaryGap: [0, 0.01]
		}],
		yAxis: [{
			type: 'category',
			itemStyle: {
				normal: {
					color: '#ffffff'
				}
			},
			data: ['风管机', '家用中央空调', '新风机', '智能中央设备']
		}],
		series: [{
			name: '',
			type: 'bar',
			data: [18203, 23489, 29034, 104970],
			barMaxWidth: '20px',
			itemStyle: {
				normal: {
					color: function(params) {
						var colorList = [
							'#f3ff3b', '#2266a4',
							'#7cd1f4', '#00b2d9',
							'#f3ff3b'
						];
						return colorList[params.dataIndex]
					}
				}
			},
		}]

	};

	// 使用刚指定的配置项和数据显示图表。
	myChart.setOption(option);
}